export default {
  process(vue, action) {
    console.log('process action:', action);
    if (action.widgetId && action.methodName) {
      let targetComp = vue.$parent.$refs['widget-' + action.widgetId];
      if (targetComp.length) {
        targetComp = targetComp[0];
      }
      const func = targetComp[action.methodName];
      // console.log(targetComp, func);
      if (func) {
        func();
      }
    }
  }
}
